package com.example.mybubbleshooter;

import android.app.Activity;
import android.os.Bundle;
import android.util.DisplayMetrics;

public class DrawActivity extends Activity {
	PlayView drawView;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		init();
		Global.initGlobal();
		Map.generateMap();
		// requesting to turn the title OFF
		// requestWindowFeature(Window.FEATURE_NO_TITLE);
		// // making it full screen
		// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
		// WindowManager.LayoutParams.FLAG_FULLSCREEN);
		// set our MainGamePanel as the View

		drawView = new PlayView(this);
		// LayoutInflater inflater = LayoutInflater.from(this);
		// // setContentView(R.layout.main);
		// // mainview = (LinearLayout) this.findViewById(R.id.main);
		// playerview = (LinearLayout) inflater.inflate(R.layout.player, null);
		//

		// Activity v=getParent();
		// ViewGroup vg = (ViewGroup)(getParent());
		// vg.removeView(myView);
		//setContentView(0);
		setContentView(drawView);
		super.onCreate(savedInstanceState);
	}

	public void init() {
		DisplayMetrics displaymetrics = new DisplayMetrics();
		getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
		Global.width = displaymetrics.widthPixels;
		Global.height = displaymetrics.heightPixels;

	}
}
